import axios from 'axios';

let instance = axios.create({
    baseURL: '/ajax',
    timeout: 5000
});
// 请求拦截器
instance.interceptors.request.use((config) => {
    return config
});
// 响应拦截器
instance.interceptors.response.use((res) => {
    return res.data;
}, (error) => {
    return Promise.reject(error)
})
export default instance;